package cn.jbolt.platform.index;

import cn.jbolt.core.api.JBoltApiBaseController;
import cn.jbolt.core.api.JBoltApiInterceptor;
import cn.jbolt.core.base.config.JBoltConfig;
import cn.jbolt.core.cache.JBoltApplicationCache;
import cn.jbolt.core.consts.JBoltConst;
import cn.jbolt.core.crossorigin.CrossOrigin;
import cn.jbolt.core.para.JBoltNoUrlPara;
import com.jfinal.aop.Before;
import com.jfinal.aop.Clear;
import com.jfinal.core.Const;
import com.jfinal.kit.Okv;
public class PlatformIndexController extends JBoltApiBaseController {
    @Clear(JBoltApiInterceptor.class)
    @Before(JBoltNoUrlPara.class)
    public void index(){
        Okv datas = Okv.create();
        datas.set("Project Name", JBoltConfig.SYSTEM_NAME+" V"+JBoltConfig.SYSTEM_VERSION);
        datas.set("Copyright Company", JBoltConfig.SYSTEM_COPYRIGHT_COMPANY);
        datas.set("JFinal Version", Const.JFINAL_VERSION);
        datas.set("JBolt Version", JBoltConst.JBOLT_VERSION);
        datas.set("Saas Mode", JBoltConfig.SAAS_ENABLE);
        datas.set("Deploy Environment", JBoltConfig.PDEV);
        datas.set("Demo Mode", JBoltConfig.DEMO_MODE);
        datas.set("Dev Mode", JBoltConfig.DEV_MODE);
        datas.set("Proxy Type", JBoltConfig.JBOLT_PROXY_TYPE);
        datas.set("Cache Type", JBoltConfig.JBOLT_CACHE_TYPE);
        if(JBoltConfig.DEV_MODE){
            datas.set("Inner Platform Application AppId", JBoltApplicationCache.me.getInnerPlatformApplicationAppId());
        }
        renderJsonData(datas,"The current access project status is healthy！");
    }
}
